home *** CD-ROM | disk | FTP | other *** search
/ Aminet 34 / Aminet 34 (2000)(Schatztruhe)[!][Dec 1999].iso / Aminet / dev / asm / ESA.readme < prev    next >
Encoding:
Text File  |  1999-11-06  |  3.1 KB  |  74 lines

  1. Short:    Extended Syntax Assembly v1.11
  2. Author:   bevilacq@cli.di.unipi.it (Simone Bevilacqua)
  3. Uploader: bevilacq@cli.di.unipi.it (Simone Bevilacqua)
  4. Type:     dev/asm
  5. Requires: 020+ CPU, KS 2.04
  6. Replaces: dev/asm/ESA.lha
  7.  
  8. Ever heard of "inline asm" inside C, Pascal, etc. ?
  9. Well, now we can have "inline C, Pascal, etc." inside asm!
  10.  
  11.  
  12. Look below: that's a small sample of ESA code!!!
  13.  
  14.  
  15. *******************************************************************************
  16. * CpyQtd
  17. *******************************************************************************
  18. * INFO          copies a string enclosed between two quotes: it is considered
  19. *               a "quote" the first char of the string;
  20. *               the copy is NULL-terminated;
  21. *               fails at the first ENTER or BLANK
  22. * SYN           StrEnd = CpyQtd[StrPtr,DstBuf]
  23. *               d0              a0     a1
  24. * IN            StrPtr       pointer to string (filename)
  25. *               DstBuf       address of destination buffer
  26. * OUT           StrEnd       pointer to last char (NULL); 0 if ERROR!
  27. * WARN          be careful there is *no* check!!!
  28. *******************************************************************************
  29.  
  30.                 function CpyQtd[a0-a1],d1/a0-a1:d0.l
  31.  
  32.                 move.b       (a0)+,d0                 ;get "quote"
  33.                 repeat
  34.                  move.b      (a0)+,d1                 ;get 1st char
  35.  
  36.                  switch.s d1.b
  37.                  -> d0                                ;successful copy
  38.                   clr.b      (a0)                     ;NULL-termination
  39.                   moveq.l    #0,d1                    ;exit loop
  40.                  -> #0                                ;unvalid char, exit loop
  41.                   suba.l     a0,a0                    ;error
  42.                  -> #10                               ;unvalid char
  43.                   moveq.l    #0,d1                    ;exit loop
  44.                   suba.l     a0,a0                    ;error
  45.                  def
  46.                   move.b     d1,(a1)+                 ;copy char
  47.                  eswitch
  48.  
  49.                 until.s ~d1.b
  50.  
  51.                 efunc,a0                              ;return new string pointer
  52.  
  53.  
  54. ============================= Archive contents =============================
  55.  
  56. Original  Packed Ratio    Date     Time    Name
  57. -------- ------- ----- --------- --------  -------------
  58.    22792   13238 41.9% 13-Oct-99 23:36:10 +ESA
  59.   104882   32459 69.0% 13-Oct-99 23:36:02 +ESA.guide
  60.     2821     973 65.5% 13-Oct-99 23:45:26 +MergeSort.ei
  61.     1725     723 58.0% 13-Oct-99 23:45:26 +QuickSort.ei
  62.     3711    1277 65.5% 13-Oct-99 23:45:26 +readme
  63.     2713    1014 62.6% 13-Oct-99 23:45:26 +data.i
  64.     1219     452 62.9% 13-Oct-99 23:45:26 +defs.i
  65.      898     348 61.2% 13-Oct-99 23:45:26 +main.esa
  66.     6819    2108 69.0% 13-Oct-99 23:45:26 +misc.ei
  67.     6594    2286 65.3% 13-Oct-99 23:45:26 +opt.ei
  68.     1900     858 54.8% 13-Oct-99 23:45:26 +split.ei
  69.      567     305 46.2% 13-Oct-99 23:45:26 +do
  70.    12666    4540 64.1% 13-Oct-99 23:48:08 +sss.guide
  71.     6672    1969 70.4% 13-Oct-99 23:45:26 +VBR2FAST.esa
  72. -------- ------- ----- --------- --------
  73.   175979   62550 64.4% 21-Oct-99 20:57:54   14 files
  74.